package com.czl.module_storehouse.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.czl.base.data.bean.tengyun.SortBean;

import java.util.List;


/**
 * @author xubin
 */
public class StoreProjectBean implements Parcelable {

    private String completeTime;
    private int miniProjectId;
    private String miniProjectName;
    private int projectId;
    private String projectName;
    private String projectNo;
    private String parentCompanyId;
    private String parentCompanyName;
    private String parentCompanyShortName;
    private int projectType;
    private int storeHouseId;
    private List<SortBean> facilityList;
    private List<SortBean> sortList;
    /**
     * 工程数据是否已转换程物品数据
     */
    private boolean isMateSortList;
    private List<SortBean> materSortList;


    protected StoreProjectBean(Parcel in) {
        completeTime = in.readString();
        miniProjectId = in.readInt();
        miniProjectName = in.readString();
        projectId = in.readInt();
        projectName = in.readString();
        projectNo = in.readString();
        parentCompanyId = in.readString();
        parentCompanyName = in.readString();
        parentCompanyShortName = in.readString();
        projectType = in.readInt();
        storeHouseId = in.readInt();
        facilityList = in.createTypedArrayList(SortBean.CREATOR);
        sortList = in.createTypedArrayList(SortBean.CREATOR);
        isMateSortList = in.readByte() != 0;
        materSortList = in.createTypedArrayList(SortBean.CREATOR);
    }

    public static final Creator<StoreProjectBean> CREATOR = new Creator<StoreProjectBean>() {
        @Override
        public StoreProjectBean createFromParcel(Parcel in) {
            return new StoreProjectBean(in);
        }

        @Override
        public StoreProjectBean[] newArray(int size) {
            return new StoreProjectBean[size];
        }
    };

    public String getProjectNo() {
        return projectNo;
    }

    public void setProjectNo(String projectNo) {
        this.projectNo = projectNo;
    }

    public List<SortBean> getMaterSortList() {
        return materSortList;
    }

    public void setMaterSortList(List<SortBean> materSortList) {
        this.materSortList = materSortList;
    }

    public boolean isMateSortList() {
        return isMateSortList;
    }

    public void setMateSortList(boolean mateSortList) {
        isMateSortList = mateSortList;
    }

    public List<SortBean> getSortList() {
        return sortList;
    }

    public void setSortList(List<SortBean> sortList) {
        this.sortList = sortList;
    }

    public String getParentCompanyId() {
        return parentCompanyId;
    }

    public void setParentCompanyId(String parentCompanyId) {
        this.parentCompanyId = parentCompanyId;
    }

    public String getParentCompanyName() {
        return parentCompanyName;
    }

    public void setParentCompanyName(String parentCompanyName) {
        this.parentCompanyName = parentCompanyName;
    }

    public String getParentCompanyShortName() {
        return parentCompanyShortName;
    }

    public void setParentCompanyShortName(String parentCompanyShortName) {
        this.parentCompanyShortName = parentCompanyShortName;
    }

    public String getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(String completeTime) {
        this.completeTime = completeTime;
    }

    public int getMiniProjectId() {
        return miniProjectId;
    }

    public void setMiniProjectId(int miniProjectId) {
        this.miniProjectId = miniProjectId;
    }

    public String getMiniProjectName() {
        return miniProjectName;
    }

    public void setMiniProjectName(String miniProjectName) {
        this.miniProjectName = miniProjectName;
    }

    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public int getProjectType() {
        return projectType;
    }

    public void setProjectType(int projectType) {
        this.projectType = projectType;
    }

    public int getStoreHouseId() {
        return storeHouseId;
    }

    public void setStoreHouseId(int storeHouseId) {
        this.storeHouseId = storeHouseId;
    }

    public List<SortBean> getFacilityList() {
        return facilityList;
    }

    public void setFacilityList(List<SortBean> facilityList) {
        this.facilityList = facilityList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(completeTime);
        dest.writeInt(miniProjectId);
        dest.writeString(miniProjectName);
        dest.writeInt(projectId);
        dest.writeString(projectName);
        dest.writeString(projectNo);
        dest.writeString(parentCompanyId);
        dest.writeString(parentCompanyName);
        dest.writeString(parentCompanyShortName);
        dest.writeInt(projectType);
        dest.writeInt(storeHouseId);
        dest.writeTypedList(facilityList);
        dest.writeTypedList(sortList);
        dest.writeByte((byte) (isMateSortList ? 1 : 0));
        dest.writeTypedList(materSortList);
    }
}
